{extend name="public/base" /} {block name="body"}
<div class="ibox float-e-margins">
	<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li><a href="{:url('Complaint/index')}"><strong>投诉建议列表</strong></a></li>

	</ol>
</div>
<div class="ibox-content">
	<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('index')}">	
		<div class="form-group">

           &nbsp;&nbsp;&nbsp;&nbsp; 
				<input type="text" id="name" name="name" value="" placeholder="请输入投诉人" class="blank" />
				&nbsp;&nbsp;投诉状态&nbsp;&nbsp;<select name="status" class="blank" >
					    <option value="0">全部</option>
                        <option value="1">未回复</option>
                        <option value="2">已回复</option>
                    </select>
                &nbsp;&nbsp;用户类型&nbsp;&nbsp;<select name="complaint_type" class="blank">
         				<option value="0">全部</option>
                        <option value="1">商家</option>
                        <option value="2">产品</option>
                        <option value="3">服务</option>
                        <option value="4">其他</option>
                    </select>
                &nbsp;&nbsp;创建时间&nbsp;&nbsp;<input id='start_time' class="blank" name='start_time' 
				 onclick='WdatePicker()' type='text' placeholder="开始时间" class="form-control layer-date" />
				 <span class="blank"><button type="submit" class="btn btn-sm btn-primary"> 查询</button> </span>

		</div>
		
		</from>
	
		<div class="hr-line-dashed"></div>
            <div class="example-wrap">
                <div class="example">
                    <table class="table table-bordered table-hover">
                        <thead>
                            <tr class="long-tr">
                                <th width="3%">ID</th>
                                <th width="10%">投诉人</th>
                                <th width="10%">投诉类型</th>
                                <th width="25%">投诉时间</th>
                                <th width="25%">投诉内容</th>
								 <th width="10%">状态</th>
                                <th width="15%">操作</th>
                            </tr>
                        </thead>
                        <tbody id="list">
                        	{volist name="list" id='ad'}
                        	<tr>
                        		<td>{$ad.id}</td>
                        		<td>{$ad.uname}</td>
                        		<td>
                        			{if $ad.complaint_type == 1}商家          
                        		     {elseif $ad.complaint_type==2}产品
                        		     {elseif $ad.complaint_type==3}服务
                        		      {else} 其它
                        		      {/if}
                        		</td>
                        		<td>{$ad.addtime}</td>
                        		<td>{$ad.content}</td>
                        		<td>
                        			{if $ad.status == 1}
                        			   未回复
                        			{else}
                        			已回复
                        			{/if}
                        		</td>
                        		<td>	
                        			{if $ad.status == 1}<a href="{:url('reply',['id'=>$ad.id])}" class="btn btn-primary bnt-sm">
										<i class="fa fa-paste"></i> 回复</a>&nbsp;&nbsp; 
									{else}<a href="{:url('detail',['id'=>$ad.id])}" class="btn btn-primary btn-warning">
										<i class="fa fa-coffee"></i> 查看</a>
									{/if}
                        		</td>
                        	</tr>
                        	{/volist}
                        </tbody>
                    </table>
                    <div style="text-align: right;">
                      {$list->render()}
                    </div>
                </div>
            </div>
            </div>
</div>
{/block} {block name="script"}
<script src="__LIB__/datepicker/WdatePicker.js"></script>
<script>
</script>
<style>
.blank{
	width: 150px;
    height:30px;
    text-align:center;
    border-radius:5px;
}
</style>
{/block}